const path  = require('path')
const resolve =require('rollup-plugin-node-resolve')
const inputPath  = path.resolve(__dirname,'./src/index.js')
const outputPath  = path.resolve(__dirname,'./dist/datav.min.js')
const babel = require('rollup-plugin-babel')
const json = require('rollup-plugin-json')
const {terser} =require('rollup-plugin-terser')

const vue = require('rollup-plugin-vue')
const postcss = require('rollup-plugin-postcss')
module.exports = {
    input: inputPath,
    output: {
        file:outputPath,
        format:'umd',
        name:'datav',
        globals: {
            vue: 'vue'
        }
    },
    plugins:[
        resolve(),
        json(),
        vue(),
        postcss({
            plugins: []
        }),
        terser(),
        babel( {
            exclude: 'node_modules/**'
        })
    ]
}
